home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Trading on the Edge
/
Trading On The Edge - CD-ROM Toolkit (Wayzata Technology)(2031)(1994).bin
/
pc
/
mac_file
/
vendor_d
/
neuralwa
/
nw2v50
/
userutl.h
< prev
next >
Wrap
Text File
|
1993-08-23
|
8KB
|
222 lines
/* Dec 1990 (userutl.h) Version 4.00 */
/************************************************************************
* Copyright(C) 1987-1992 NeuralWare Inc *
* Penn Center West, IV-227, Pittsburgh, PA 15276 *
* Telephone: (412) 787-8222 FAX: (412) 787-8220 *
* *
* All rights reserved. No part of this program may be reproduced, *
* stored in a retrieval system, or transmitted, in any form or by any *
* means, electronic, mechanical, photocopying, recording or otherwise *
* without the prior written permission of the copyright owner, *
* NeuralWare, Inc. *
* *
* PROPRIETARY NOTICE *
* *
* This document is the property of NeuralWare, Inc. and contains *
* trade-secrets and other proprietary information. The information *
* herein is reserved as proprietary to NeuralWare, and is not to be *
* published, reproduced, copied, disclosed, used, or reverse *
* engineered without the express written consent of a duly authorized *
* representative of NeuralWare. *
************************************************************************
*/
#include "host.h"
#ifdef __ZTC__
#ifndef DLC
#define DLC 1
#endif
#endif
#ifdef THINK_C /* No command line for Think C */
#ifndef MAC
#define MAC 1
#endif
#include <stdio.h>
#endif
#ifdef MAC
#undef UNIX
#endif
#ifdef DLC
#undef UNIX
#endif
#ifdef XTM
struct sem {
int semval;
};
struct sembuf{
int sem_num;
int sem_op;
int sem_flg;
};
#endif
#ifdef UNIX
#if defined(PS2AIX) || defined(RS6) || defined(XTM) /* || defined(HP700) */
#define SEMTYPE struct sem
#else
#if defined(EWS) || defined(VAXULT) || defined(HP700) || defined(SOLARIS)
typedef union {
int val;
struct semid_ds *buf;
ushort *array;
} SEMTYPE;
#define semval val /* for "arg.val" */
#else
#define SEMTYPE union semun
#define semval val /* for "arg.val" */
#endif
#endif
#endif /* UNIX */
#if defined(THINK_C)
#define NEW_LINE ((int)'\r')
#define NEW_LINE_STR "\r"
#else /* THINK_C */
#define NEW_LINE ((int)'\n')
#define NEW_LINE_STR "\n"
#endif /* THINK_C */
/* Compatibility codes for switch statement version of UserIO */
#define RQ_LEARNIN 1 /* training input */
#define RQ_LEARNOUT 2 /* training desired output */
#define RQ_LEARNRSLT 6 /* training result */
#define RQ_READ 3 /* operational input */
#define RQ_WRITE 4 /* operational output */
#define RQ_WRSTEP 10 /* interim output (Hopfield/BAM) */
#define RQ_LSTART 7 /* start learning */
#define RQ_RSTART 8 /* start recall */
#define RQ_LEND 14 /* end learning */
#define RQ_REND 15 /* end recall */
#define RQ_TERM 5 /* terminate */
#define RQ_ATTENTION 9 /* unsolicited request for attention */
#define RQ_REWIND 11 /* rewind input file */
#define RQ_INSTRUM 13 /* output data from instrument */
#define RQ_RCLTST 16 /* Recall Test */
#define RQ_EXPLAIN 17 /* Explain output */
#define RQ_OBJFUNC 19 /* Objective function */
/* the following definitions are for requests to NeuralWorks */
#define UGX_DATA 0 /* responded to data */
#define UGX_GETDS 1 /* get a string from dialog area */
#define UGX_PUTDS 2 /* put a string to dialog area */
#define UGX_SAVENET 3 /* save the network */
#define UGX_GRPARM 4 /* get x-size, y-size, ncolors */
#define UGX_CLEAR 5 /* clear a window's contents */
#define UGX_DELETE 6 /* delete a window */
#define UGX_WINDOW 7 /* set up a window */
#define UGX_LINE 8 /* draw a line */
#define UGX_POINT 9 /* draw a point */
#define UGX_BOX 10 /* draw an outline box */
#define UGX_BOXF 11 /* draw a filled box */
#define UGX_PUTS 12 /* put a string in a window */
#define UGX_MOUSE 13 /* read mouse position / buttons */
#define UGX_RDPOINT 14 /* read a point */
#define UGX_RDNETINF 15 /* read network info */
#define UGX_GETINSTRT 16 /* Get instrument title */
#define UGX_CIRCLE 29 /* draw a circle */
/* the following are ONLY for requests from user control routines */
#define UGX_LOADNET 17 /* load a network */
#define UGX_LEARN 18 /* learn */
#define UGX_RECALL 19 /* recall */
#define UGX_MSGIO 20 /* message I/O */
/* Additional features for accessing network data */
#define UGX_PEIO 25 /* PE read/write */
#define UGX_SCHDIO 26 /* L/R Schedule R/W */
#define UGX_CTRIO 27 /* Super-Layer Ctrs R/W */
#define UGX_CNIO 28 /* Connection R/W */
/* The following codes are for faster graphics where fewer context
switches are needed */
#define UGX_BLIT 21 /* blit an array to the screen*/
#define UGX_PBLIT 24 /* blit a single-color pattern to scrn */
/* New features added for Pruning */
#define UGX_WTSTATS 22 /* weight statistics */
#define UGX_PRUNE 23 /* prune network */
#ifndef NPHIST
#define NPHIST 100 /* # of items in histogram */
#endif
/* mouse button bit definitions for "ug_mouse" */
#define MBUT_RIGHT 0x04 /* right mouse button */
#define MBUT_MIDDLE 0x02 /* middle mouse button */
#define MBUT_LEFT 0x01 /* left mouse button */
/************************************************************************
* *
* Graphics menu interface header file *
* *
************************************************************************
These structures and defines are included for convience as part of the
graphics interface used by several of the User I/O examples. They are
not necessary to the operation of the program.
The GMENU structure defines the basic parameters for a menu. Menu
items (which go ACROSS the screen) are defined in an array of
GMENU_ITEM structures.
*/
typedef struct { /* Graphics menu item */
int code; /* menu item code */
char *text; /* line of text for menu item */
char *text2; /* auxillary line of text for menu item */
int flag;
#define GM_HILITE 0x0001 /* item highlighted */
#define GM_LOCKED 0x0002 /* item locked */
int x0,y0,x1,y1; /* interior box (for highlighting) */
int xt, yt; /* x,y coords of text */
} GMENU_ITEM;
typedef struct { /* Graphics menu - horizontal line of items */
GMENU_ITEM *item; /* pointer to array of items */
int num_items; /* number of menu items */
int key; /* window key */
int flag;
#define GM_AUX 0x0001 /* Set if auxillary line of text */
int x0, y0; /* BL of menu relative to window */
int x1, y1; /* TR of menu relative to BL */
} GMENU;
#define GM_MARGIN 2 /* text margin in y direction */
#ifndef DP_RUN
GLOBALREF NINT gm_intcolor; /* interior color */
GLOBALREF NINT gm_outcolor; /* outline color */
GLOBALREF NINT gm_txtcolor; /* text color */
#endif
IMPORT VOID InitGMenu ARGLIST ((GMENU *,int,int )); /* Initialize a menu */
IMPORT VOID DispGMenu ARGLIST ((GMENU * )); /* Display menu */
IMPORT VOID DispGItem ARGLIST ((GMENU *,GMENU_ITEM *,int,int )); /* Display menu item */
IMPORT GMENU_ITEM *LookGMenu ARGLIST ((GMENU *, int * )); /* Look at menu */
#ifndef UIO_STRC_H
#include "uio_strc.h"
#endif
#include "uio_reqs.pro"